package com.iRomantic.controller.app;

import java.util.List;

import com.iRomantic.common.AppJsonResponse;
import com.iRomantic.common.BaseController;
import com.iRomantic.domain.entity.Hotel;
import com.iRomantic.domain.entity.HotelPicture;

public class HotelAPPController extends BaseController {
	
	/**
	 * 获取婚礼现场图片
	 */
	public void getHotelPicture(){
		AppJsonResponse jsonResult = this.createAppJsonResponse();
		Hotel hotel = this.getModel(Hotel.class);
		List<HotelPicture> pictures = HotelPicture.DAO.findByHotelId(hotel.getStr("id"));
		for(HotelPicture p :pictures){
			p.setOSSPath(p);
		}
		jsonResult.setResult(pictures);
		renderJson(jsonResult);
	}
}
